
CC = /home/wsl/rpi/gcc/bin/arm-linux-gnueabihf-gcc

VC_ROOT = /home/wsl/rpi/vc

CFLAGS =-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS \
	-DTARGET_POSIX -D_LINUX \
	-D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE \
	-DUSE_VCHIQ_ARM \
	-Wall -fPIC -DPIC -g -ftree-vectorize -pipe -Wno-psabi -funwind-tables

LDFLAGS =-L$(VC_ROOT)/lib/ -lmmal_core -lmmal_util -lmmal_vc_client -lvcsm -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm

INCLUDES =-I$(VC_ROOT)/include/ -I$(VC_ROOT)/include/interface/vcos/pthreads -I$(VC_ROOT)/include/interface/vmcs_host/linux

rpi_camera : rpi_camera.c rpi_camera_control.c util.c
	$(CC) $^ -o $@ $(CFLAGS) $(INCLUDES) $(LDFLAGS)
